package com.first.statistics.controller;

import com.first.common.pojo.Order;
import com.first.common.vo.Result;
import com.first.statistics.service.StatOrderService;
import com.first.statistics.vo.TbMemberVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: SecondProject
 * @description:
 * @author: 李榕轩
 * @create: 2023-05-30 09:02
 **/
@RestController
@RequestMapping("/stat/order")
@Api(tags = "统计订单表")
public class StatOrderController {
    @Autowired
    private StatOrderService statOrderService;
    @ApiOperation("查询订单表")
    @PostMapping("/queryOrder")
    public Result queryAllOrder(@RequestBody TbMemberVo tbMemberVo){
        List<Order> orders = statOrderService.queryAll(tbMemberVo);
        return Result.success(orders);
    }
}
